package biz.ezcom.design.pattern.builder;

/**
 * 建造者中的指挥者 
 */
public class Director {
	private Builder builder;

	public Director(Builder builder){
		this.builder = builder;
	}
	
	public Product createProduct(){
		builder.createHeader();
		builder.createBody();
		builder.createLeftArm();
		builder.createRightArm();
		builder.createLeftLeg();
		builder.createRightLeg();
		return builder.getProduct();
	}
}
